package com.handle.common.core.enums;

import lombok.Getter;

/**
 * @author zhangqing
 * @version V1.0
 * @description 授权类型枚举
 * @date 4/3/2021 2:27 PM
 */
@Getter
public enum GrantType {

    /**
     * oauth2授权模式
     */
    AUTHORIZATION_CODE("authorization_code","授权码模式"),
    IMPLICIT("implicit","简化模式/隐式授权模式"),
    PASSWORD("password","密码模式"),
    CLIENT_CREDENTIALS("client_credentials","客户端模式"),
    REFRESH_TOKEN("refresh_token","刷新token");

    private final String code;
    private final String name;

    GrantType(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static void main(String[] args) {
        System.out.println(GrantType.PASSWORD.code);
    }
}
